package com.junray.mqttmanager

import androidx.annotation.IntDef

@IntDef(
    *[
        MQTTState.STATE_CONNECT_SUCCESS, MQTTState.STATE_CONNECT_FAILURE,
        MQTTState.STATE_SUBSCRIBE_SUCCESS, MQTTState.STATE_SUBSCRIBE_FAILURE,
        MQTTState.STATE_CONNECTION_LOST, MQTTState.STATE_SEND_COMPLETE,
    ]
)
@Retention(
    AnnotationRetention.SOURCE
)
annotation class MQTTState {
    companion object {
        const val STATE_CONNECT_SUCCESS: Int = 0 //连接成功
        const val STATE_CONNECT_FAILURE: Int = 1 //连接失败
        const val STATE_SUBSCRIBE_SUCCESS: Int = 2 //订阅主题成功
        const val STATE_SUBSCRIBE_FAILURE: Int = 3 //订阅主题失败
        const val STATE_CONNECTION_LOST: Int = 4 //连接断开
        const val STATE_SEND_COMPLETE: Int = 5 //发送消息成功
    }
}
